/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package MODEL;

import java.io.Serializable;
import java.math.BigInteger;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author ahmed
 */
@Embeddable
public class Reserver2PK implements Serializable {
    @Basic(optional = false)
    @Column(name = "ID_C")
    private String idC;
    @Basic(optional = false)
    @Column(name = "ID_ITEM")
    private BigInteger idItem;

    public Reserver2PK() {
    }

    public Reserver2PK(String idC, BigInteger idItem) {
        this.idC = idC;
        this.idItem = idItem;
    }

    public String getIdC() {
        return idC;
    }

    public void setIdC(String idC) {
        this.idC = idC;
    }

    public BigInteger getIdItem() {
        return idItem;
    }

    public void setIdItem(BigInteger idItem) {
        this.idItem = idItem;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idC != null ? idC.hashCode() : 0);
        hash += (idItem != null ? idItem.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Reserver2PK)) {
            return false;
        }
        Reserver2PK other = (Reserver2PK) object;
        if ((this.idC == null && other.idC != null) || (this.idC != null && !this.idC.equals(other.idC))) {
            return false;
        }
        if ((this.idItem == null && other.idItem != null) || (this.idItem != null && !this.idItem.equals(other.idItem))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "MODEL.Reserver2PK[ idC=" + idC + ", idItem=" + idItem + " ]";
    }
    
}
